import { ProcessHost } from 'electron-re'
import { getResultByKeyword } from './utils.js'


ProcessHost
    .registry('task1', async ({url,keyword:params}) => {
        // console.log('fffffffffffff',url,params);
        let res = await getResultByKeyword(url,params)
        if (res) {
            // console.log(res.data);
            return {url,params,data:res.data}
        }
    })
    .registry('init-works', (params) => {
      return fetch(url);
    });
